#pragma once
#include "portabledeviceapi.h"

// based on:
// http://blogs.msdn.com/b/dimeby8/archive/2006/10/06/listening-to-wpd-events.aspx
class PortDevEventCallback :
    public IPortableDeviceEventCallback
{
public:
    PortDevEventCallback(void);
    ~PortDevEventCallback(void);

    HRESULT __stdcall QueryInterface(REFIID riid, LPVOID *ppvObj);

    ULONG __stdcall AddRef();

    ULONG __stdcall Release();

    HRESULT __stdcall OnEvent(IPortableDeviceValues *pEventParameters);

    HRESULT __stdcall Register(IPortableDevice *pDevice);

    HRESULT __stdcall UnRegister(IPortableDevice *pDevice);

private:
    ULONG refCount;
    LPWSTR eventCookie;

    //MTPconnect *mtp;
};

